#! /bin/bash

###
 # @Author: xiaoxiaotaoya 1712331226@qq.com
 # @Date: 2023-03-26 16:59:54
 # @LastEditors: xiaoxiaotaoya 1712331226@qq.com
 # @LastEditTime: 2023-03-26 17:11:54
 # @FilePath: /trobot_dev_ros1/src/0_robot_startup/robot_bringup/sh/serial_config.sh
 # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
### 


#udevadm info --attribute-walk --name=/dev/ttyUSB0
ls /dev/ttyUSB*
sudo chmod 777 /dev/ttyUSB0
sudo chmod 777 /dev/ttyUSB1

# sudo nano /etc/udev/rules.d/trobot.rules
# KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0005", MODE:="0777", SYMLINK+="lidar_n10"
# KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0002", MODE:="0777", SYMLINK+="stam32_f4"

sudo service udev reload && sudo service udev restart
sudo udevadm trigger
ls -l /dev | grep ttyUSB